home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / Musique / Quod Libet / quodlibet-3.3.0-installer.exe / bin / quodlibet / formats / aac.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2014-12-31  |  2KB  |  51 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.7)
  3.  
  4. from _audio import AudioFile
  5. extensions = [
  6.     '.aac',
  7.     '.adif',
  8.     '.adts']
  9.  
  10. try:
  11.     from mutagen.aac import AAC
  12. except ImportError:
  13.     extensions = []
  14.  
  15.  
  16. class AACFile(AudioFile):
  17.     '''ADTS/ADIF files'''
  18.     format = 'AAC'
  19.     mimes = [
  20.         'audio/x-aac']
  21.     fill_length = True
  22.     
  23.     def __init__(self, filename):
  24.         audio = AAC(filename)
  25.         self['~#length'] = audio.info.length
  26.         self['~#bitrate'] = int(audio.info.bitrate / 1000)
  27.         self.sanitize(filename)
  28.  
  29.     
  30.     def write(self):
  31.         pass
  32.  
  33.     
  34.     def reload(self, *args):
  35.         title = self.get('title')
  36.         super(AACFile, self).reload(*args)
  37.         if title is not None:
  38.             self.setdefault('title', title)
  39.  
  40.     
  41.     def can_change(self, k = None):
  42.         if k is None:
  43.             return [
  44.                 'title']
  45.         return None == 'title'
  46.  
  47.  
  48. info = AACFile
  49. types = [
  50.     AACFile]
  51.